﻿using Csla;
using lite;
using System.ComponentModel;
using System;
using System.Collections.Generic;

namespace iSun.Model
{
    [Serializable]
    [lite.Table(Name = "Set_Entity")]
    [Table("Set_Entity", "EntityId")]
    public class Entity : BaseEntity
    {
        public Entity()
        {
            //this.ListId = Guid.NewGuid();
        }


        private static PropertyInfo<System.Guid> EntityIdProperty = RegisterProperty(typeof(Entity), new PropertyInfo<Guid>("EntityId"));

        [Column, PK]
        public System.Guid EntityId
        {
            get { return GetProperty(EntityIdProperty); }
            set { SetProperty(EntityIdProperty, value); }
        }

        [Column]
        public int EditPageHeight
        {
            get;
            set;
        }

        [Column]
        public int EditPageWidth
        {
            get;
            set;
        }

        [Column]
        public int DefaultPageSize
        {
            get;
            set;
        }
        private static PropertyInfo<System.String> EntityNameProperty = RegisterProperty(typeof(Entity), new PropertyInfo<System.String>("EntityName"));

        [Column]
        public System.String EntityName
        {
            get { return GetProperty(EntityNameProperty); }
            set { SetProperty(EntityNameProperty, value); }
        }


        private static PropertyInfo<System.String> TableNameProperty = RegisterProperty(typeof(Entity), new PropertyInfo<System.String>("TableName"));

        [Column]
        public System.String TableName
        {
            get { return GetProperty(TableNameProperty); }
            set { SetProperty(TableNameProperty, value); }
        }
        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<System.String> ListPageProperty = RegisterProperty(typeof(Entity), new PropertyInfo<System.String>("ListPage"));


        [Column]
  
        public System.String ListPage
        {
            get { return GetProperty(ListPageProperty); }
            set { SetProperty(ListPageProperty, value); }
        }

        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<System.String> EditPageProperty = RegisterProperty(typeof(Entity), new PropertyInfo<System.String>("EditPage"));
        [Column]
        public System.String EditPage
        {
            get { return GetProperty(EditPageProperty); }
            set { SetProperty(EditPageProperty, value); }
        }

        [Column]
        public string BLLConfig
        {
            get;
            set;
        }


        //public IList<DataListTemplate> ListTemplate
        //{
        //    get;
        //    set;
        //}

        protected override void AddBusinessRules()
        {
            // base.AddBusinessRules();
        }
    }

 
}
